home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15075 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: ix.netcom.com!netnews
  2. From: jlilley@ix.netcom.com (John Lilley)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Problem with copy constructor in derived class
  5. Date: 3 Apr 1996 14:38:46 GMT
  6. Organization: Netcom
  7. Message-ID: <4ju2hm$96q@cloner2.ix.netcom.com>
  8. References: <bforney-0104962228190001@grimmy.reshall.umich.edu>
  9. NNTP-Posting-Host: den-co11-06.ix.netcom.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-NETCOM-Date: Wed Apr 03  6:38:46 AM PST 1996
  13. X-Newsreader: WinVN 0.99.7
  14.  
  15. In article <bforney-0104962228190001@grimmy.reshall.umich.edu>, 
  16. bforney@umich.edu says...
  17. >
  18. >Hello. I'm trying to create a copy constructor for a derived class. The
  19. >base class does not have a copy constructor, so this could be a problem.
  20. >(I'm really not sure.) Can anyone tell me if the base class needs a copy
  21. >constructor?
  22. >
  23. >I started to consider the lack of a copy constructor in the base class a
  24. >problem when Metrowerks 8's C++ compiler displayed this warning:
  25. >
  26. >Error   : cannot construct base class 'LArray'
  27. >UUrl.cp line 27   }
  28. >
  29. >Here's the function in which the error occurs:
  30. >
  31. >LUrlArray::LUrlArray(const LUrlArray &inArray)
  32. >{
  33. >   CopyWholeArray(inArray);
  34. >}
  35. >
  36. >The error occurs at the close brace. I'm not sure why this is happening.
  37.  
  38.  
  39. While terseness in postings is appreciated, I am afraid that I cannot discern 
  40. a solution without some more info?  Can you include the declaration for the 
  41. base class and the CopyWholeArray method?
  42.  
  43. john lilley
  44.  
  45.  
  46.